//package com.itshen.two;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.amqp.core.Message;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.boot.autoconfigure.amqp.RabbitProperties;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
///**
// * 消费者
// * @author milicool
// * Created on 2018/9/14
// */
//@Component
//public class Comsumer {
//    private Logger log = LoggerFactory.getLogger(Comsumer.class);
//
//    @RabbitListener(queues = "queue-test")
//    public void process(Message message, Channel channel) throws IOException {
//        // 采用手动应答模式, 手动确认应答更为安全稳定
//        channel.basicAck(message.getMessageProperties().getDeliveryTag(), true);
//        log.info("receive: " + new String(message.getBody()));
//    }
//}